package org.github.manx98.jlibhac.hle;

import lombok.Data;
import org.github.manx98.jlibhac.fs.IStorage;

import java.io.IOException;

/**
 * @author Manx98
 * @version 1.0
 * @since 2022/10/6 0:07
 */
@Data
public class KernelAccessControl {

    private final int[] Capabilities;

    public KernelAccessControl(IStorage stream, int offset, int size) throws IOException {
        stream.setPosition(offset);

        Capabilities = new int[size / 4];

        for (int index = 0; index < Capabilities.length; index++) {
            Capabilities[index] = stream.readInt();
        }
    }
}
